<!DOCTYPE html >
<html xmlns:th="http://www.thymeleaf.org">

<head>
	<meta charset="utf-8">
	<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
	<title>结转</title>

	<link rel="stylesheet" type="text/css" href="/static/css/bootstrap.min.css">
	<link rel="stylesheet" type="text/css" href="/static/fonts/line-icons.css">
	<link href="/static/plugins/datatables/dataTables.bootstrap4.min.css" rel="stylesheet" type="text/css" />
	<link href="/static/plugins/datatables/buttons.bootstrap4.min.css" rel="stylesheet" type="text/css" />
	<link href="/static/plugins/datatables/responsive.bootstrap4.min.css" rel="stylesheet" type="text/css" />
	<link rel="stylesheet" type="text/css" href="/static/css/main.css">
	<link rel="stylesheet" type="text/css" href="/static/css/responsive.css">

</head>
<body>
	<div class="app header-default side-nav-dark">
		<div class="layout">
			<!--顶部栏-->
			<div th:replace="~{/topbar::topbar}">
			</div>
			<!--侧边栏-->
			<div th:replace="~{/sidebar::sidebar}">
			</div>
			<!--主体部分-->
			<div class="page-container">

				<div class="main-content">
					<div class="container-fluid">

						<div class="breadcrumb-wrapper row">
							<div class="col-12 col-lg-3 col-md-6">
								<h4 class="page-title">项目信息一览表</h4>
							</div>
						</div>

					</div>
					<div class="container-fluid">
						<div class="row">
							<div class="col-md-12">
								<span class="badge badge-default">结项信息列表</span>
								<br>
								<br>
								<table id="datatable" class="table table-bordered">
									<thead>
									<tr>
<!--										<th>-->
<!--											#-->
<!--										</th>-->
										<th>
											项目名称
										</th>
										<th>
											负责人
										</th>
										<th>
											立项时间
										</th>
										<th>
											剩余经费
										</th>
										<th>
											操作
										</th>


									</tr>
									</thead>
									<tbody>
									<tr th:each="project:${coList}">
<!--										<td th:text="${project.getId()}">-->
<!--											1-->
<!--										</td>-->
										<td th:text="${project.getName()}">
											高校科研创新服务平台
										</td>
										<td th:text="${project.getLeader()}">
											张三
										</td>
										<td th:text="${project.getApplyTime()}">
											2019-07-07
										</td>
										<td th:text="${project.getMoney()}">
											100.0
										</td>
										<td>
											<a th:href="@{'/project/operate?id='+${project.id}}">
												<button type="button" class="btn btn-link">
													结转
												</button>
											</a>
											<a>
												<button type="button" class="btn btn-link"
														th:onclick="f([[${project.id}]]);">删除</button>
											</a>
										</td>
									</tr>
									</tbody>
								</table>
							</div>
						</div>
					</div>


					<footer class="content-footer">
						<div th:replace="~{/footer::footer}"></div>
					</footer>

				</div>

			</div>
		</div>
	</div>
	<script src="/static/js/jquery-min.js"></script>
	<script src="/static/js/popper.min.js"></script>
	<script src="/static/js/bootstrap.min.js"></script>
	<script src="/static/js/scripts.js"></script>
	<script src="/static/js/jquery.app.js"></script>
	<script src="/static/js/main.js"></script>

	<script src="/static/plugins/datatables/jquery.dataTables.min.js"></script>
	<script src="/static/plugins/datatables/dataTables.bootstrap4.min.js"></script>

	<script src="/static/plugins/datatables/dataTables.buttons.min.js"></script>
	<script src="/static/plugins/datatables/buttons.bootstrap4.min.js"></script>
	<script src="/static/plugins/datatables/jszip.min.js"></script>
	<script src="/static/plugins/datatables/pdfmake.min.js"></script>
	<script src="/static/plugins/datatables/vfs_fonts.js"></script>
	<script src="/static/plugins/datatables/buttons.html5.min.js"></script>
	<script src="/static/plugins/datatables/buttons.print.min.js"></script>
	<script src="/static/plugins/datatables/buttons.colVis.min.js"></script>

	<script src="/static/plugins/datatables/dataTables.responsive.min.js"></script>
	<script src="/static/plugins/datatables/responsive.bootstrap4.min.js"></script>

	<script src="/static/js/datatables.init.js"></script>
	
	<script type="text/javascript">
	// $('header navbar').load('/static/head.html',function(responseTxt,statusTxt,xhr){
     //        console.log('responseTxt,statusTxt,xhr');
	// 		}
	// )
	</script>
	<script type="text/javascript">
		function f(id) {
			var a=confirm("确认删除？");
			if(a===true){
			$.ajax({
				url:"/project/delete1",
				type:"post",
				data:JSON.stringify({
					"id":id
				}),
				contentType:"application/json",
				dataType:"json",
				success:function (result) {
					if (result && result.success) {
						alert("删除成功");
						location.reload();
					} else {
						alert(result.msg);
					}
				}
			});}
			return false;
		}
	</script>
	</body>
	</html>